home *** CD-ROM | disk | FTP | other *** search
- EmBClass.bas - Demonstration of a BOOPSI private image class
- ============================================================
-
- Derived from Commodore-Amiga example (c) Copyright 1992 Commodore-Amiga, Inc.
-
- This is a translation of a Commodore example using the Workbench 2 BOOPSI
- object oriented intuition features.
-
- The example shows simple sub-classing of the the BOOPSI imageclass to
- implement a embossed box (there are easier ways than this, but its just
- an example!): the main program (EmBDemo.bas), initialises the class, creates
- and instance and then draws it in both states via Intuition's DrawImageState.
- The sub-class (EmBClass.bas) is entered via the hook mechanism, initialised
- in initEmBClass. Only one method of the super-class is specialised in this
- class, the IM_DRAW method, used for drawing the image in the appropriate
- state. Note that BOOPSI sub-classes may execute as part of several tasks
- simultaneously (i.e. they must be re-entrant), also almost all checks must
- be disabled since the system stacks will not be where the BASIC runtime
- routines expect.
-
- The example will work on versions of Workbench 2.0 or later (V36 and above)
-
- Compiling
- ---------
- Load the EmBClass_inc.bh file and Tokenise it (Program-Tokenise), making sure
- you have no token file selected in the File Options (Settings-Compiler-Files).
- Once you have your token file, set the File Options-Token File setting to the
- EmBClass_inc.t file just created. Load the EmBDemo.bas file, compile and run
- it.
-